var e = require;
var t = module;
var o = exports;
var n,
    i = o,
    a =
        ((n = function (e, t) {
            return (n =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (e, t) {
                        e.__proto__ = t;
                    }) ||
                function (e, t) {
                    for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
                })(e, t);
        }),
        function (e, t) {
            function o() {
                this.constructor = e;
            }
            n(e, t), (e.prototype = null === t ? Object.create(t) : ((o.prototype = t.prototype), new o()));
        }),
    r = function (e, t, o, n) {
        var i,
            a = arguments.length,
            r = a < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, o)) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, o, n);
        else
            for (var s = e.length - 1; s >= 0; s--)
                (i = e[s]) && (r = (a < 3 ? i(r) : a > 3 ? i(t, o, r) : i(t, o)) || r);
        return a > 3 && r && Object.defineProperty(t, o, r), r;
    };
Object.defineProperty(i, "__esModule", {value: !0});
var s = e("GlobalParam"),
    c = e("nodePoolManager"),
    l = cc._decorator,
    d = l.ccclass,
    u =
        (l.property,
        (function (e) {
            function t() {
                var t = (null !== e && e.apply(this, arguments)) || this;
                return (t.isAddBlood = !0), t;
            }
            return (
                a(t, e),
                (t.prototype.playAni = function (e) {
                    var t = this;
                    void 0 === e && (e = !1),
                        (this.node.active = !0),
                        (this.node.y = 0),
                        e
                            ? ((this.node.getComponent(cc.Label).string =
                                  "+" + 2 * s.default.GameConfigData.StoreFoodFraction),
                              (this.node.color = cc.Color.WHITE),
                              (this.node.scale = 3))
                            : this.isAddBlood
                            ? ((this.node.getComponent(cc.Label).string = "+" + s.default.GameConfigData.addStars),
                              (this.node.color = cc.Color.GREEN))
                            : ((this.node.getComponent(cc.Label).string = "-" + s.default.GameConfigData.reduceStars),
                              (this.node.color = cc.Color.RED)),
                        (this.node.y = 0),
                        cc
                            .tween(this.node)
                            .by(0.5, {position: cc.v3(0, 100, 0)})
                            .call(function () {
                                (t.node.scale = 1), (t.node.active = !1), c.default.instance.delBloodNode(t.node);
                            })
                            .start();
                }),
                r([d], t)
            );
        })(cc.Component));
i.default = u;
